{% extends 'base.html' %}
{% block title %}
 朋友管理
{% endblock %}

{% block body %}

<div class="layui-tab">
  <ul class="layui-tab-title">
    <li class="layui-this">朋友列表</li>
    <li>生日</li>
    <li>添加朋友</li>
  </ul>
  <div class="layui-tab-content" style="min-height: 150px; padding: 5px 0 0 0;">
    <div class="layui-tab-item layui-show" >
        <iframe src="{{ url_for('fmg_list') }}" id="ifr1" width="100%"  frameborder="0"  ></iframe>
    </div>
    <div class="layui-tab-item">
        <iframe src="{{ url_for('fmg_birthday') }}" id="ifr2" width="100%"  frameborder="0"  ></iframe>
    </div>
    <div class="layui-tab-item">
        <iframe src="{{ url_for('add_fmg') }}" id="ifr3" width="100%"  frameborder="0"  ></iframe>
    </div>
  </div>
</div>




{% endblock %}

{% block js %}
<script>


 function calcPageHeight(doc) {
      var cHeight = Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
      var sHeight = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight)
      var height  = Math.max(cHeight, sHeight)
      return height
  }
  var ifr = document.getElementById('ifr1')
  ifr.onload = function() {
      var iDoc = ifr.contentDocument || ifr.document
      var height = calcPageHeight(iDoc)
      ifr.style.height = height + 'px'
  }
  var ifr2 = document.getElementById('ifr2')
  ifr2.onload = function() {
      var iDoc = ifr2.contentDocument || ifr2.document
      var height = calcPageHeight(iDoc)
      ifr2.style.height = height + 'px'
  }
  var ifr3 = document.getElementById('ifr3')
  ifr3.onload = function() {
      var iDoc = ifr3.contentDocument || ifr3.document
      var height = calcPageHeight(iDoc)
      ifr3.style.height = height + 'px'
  }
</script>
{% endblock %}